package com.xinxi11.project.qx.beans;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;

import com.xinxi11.module.core.entity.RecordSupport;

/**
 * 
 */
@Entity
@Table(name = "qx_module")
public class QxModule extends RecordSupport<String> implements java.io.Serializable {

	private static final long serialVersionUID = 6599557473675921542L;
	/** URL名称,名称唯一.如:添加用户 **/
	private String name;
	/** URL名称的别名.如:添加用户(唯一)-->添加(不唯一,但方便在页面显示) **/
	private String alias;
	/** 模块层级 **/
	private Integer level;
	/** 模块编号 **/
	private String mask;
	/** 排序,仅限于相同父节点的模块 **/
	private Integer sort;
	/** 父模块ID **/
	private String parentId;
	/** 模块版本 **/
	private String version;
	/** 操作类型:1:查询列表,2:添加,4:修改,8:删除/批量删除,16:查询明细(查看),32:审核,64:导入,128:导出 **/
	private Integer operationType;
	/** 跳转到页面的URL **/
	private String pageUrl;
	/** 页面表单提交后跳转到的后台逻辑处理的URL操作 **/
	private String submitUrl;
	/** 在首页的权限菜单树中是否显示.1:不显示(默认),2:显示. **/
	private Integer desplay;
	/** 此模块是否请允许有自定义字段,1:不允许(默认),2:允许. **/
	private Integer hasCustom = 1;
	/** 对应的操作IDs,","分割 **/
	private String operationIds;
	/** 对应的table实体的Ids,","分割 **/
	private String tableIds;
	/** 对应的被分配的属性的IDs,","分割 **/
	private String fieldIds;

	// 父部门名称
	private String parentName;

	/** default constructor */
	public QxModule() {
	}

	/** minimal constructor */
	public QxModule(String id) {
		this.id = id;
	}

	// Property accessors
	@Id
	@Column(name = "id", unique = true, nullable = false, length = 50)
	public String getId() {
		return this.id;
	}

	@Column(name = "name", length = 50)
	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@Column(name = "alias", length = 50)
	public String getAlias() {
		return this.alias;
	}

	public void setAlias(String alias) {
		this.alias = alias;
	}

	@Column(name = "level")
	public Integer getLevel() {
		return this.level;
	}

	public void setLevel(Integer level) {
		this.level = level;
	}

	@Column(name = "mask")
	public String getMask() {
		return mask;
	}

	public void setMask(String mask) {
		this.mask = mask;
	}

	@Column(name = "sort")
	public Integer getSort() {
		return this.sort;
	}

	public void setSort(Integer sort) {
		this.sort = sort;
	}

	@Column(name = "parentId", length = 50)
	public String getParentId() {
		return this.parentId;
	}

	public void setParentId(String parentId) {
		this.parentId = parentId;
	}

	@Column(name = "version", length = 50)
	public String getVersion() {
		return this.version;
	}

	public void setVersion(String version) {
		this.version = version;
	}

	@Column(name = "operationType")
	public Integer getOperationType() {
		return this.operationType;
	}

	public void setOperationType(Integer operationType) {
		this.operationType = operationType;
	}

	@Column(name = "pageUrl", length = 200)
	public String getPageUrl() {
		return this.pageUrl;
	}

	public void setPageUrl(String pageUrl) {
		this.pageUrl = pageUrl;
	}

	@Column(name = "submitUrl", length = 200)
	public String getSubmitUrl() {
		return this.submitUrl;
	}

	public void setSubmitUrl(String submitUrl) {
		this.submitUrl = submitUrl;
	}

	@Column(name = "desplay")
	public Integer getDesplay() {
		return this.desplay;
	}

	public void setDesplay(Integer desplay) {
		this.desplay = desplay;
	}

	@Column(name = "hasCustom")
	public Integer getHasCustom() {
		return this.hasCustom;
	}

	public void setHasCustom(Integer hasCustom) {
		this.hasCustom = hasCustom;
	}

	@Column(name = "operationIds", length = 1000)
	public String getOperationIds() {
		return this.operationIds;
	}

	public void setOperationIds(String operationIds) {
		this.operationIds = operationIds;
	}

	@Column(name = "tableIds", length = 1000)
	public String getTableIds() {
		return this.tableIds;
	}

	public void setTableIds(String tableIds) {
		this.tableIds = tableIds;
	}

	@Column(name = "fieldIds", length = 2000)
	public String getFieldIds() {
		return this.fieldIds;
	}

	public void setFieldIds(String fieldIds) {
		this.fieldIds = fieldIds;
	}

	@Transient
	public String getParentName() {
		return parentName;
	}

	public void setParentName(String parentName) {
		this.parentName = parentName;
	}
}